var express = require('express');
var router = express.Router();

//引入功能 将每个功能引入
const {
  getAllAdmins,
  getOneAdmin,
  updateOneAdmin,
  addOneAdmin,
  AdminLogin,
  deleteOneAdmin,
} = require('../controllers/admins');

// 获取所有学生数据(RESTful)
router.post('/getAllAdmins', getAllAdmins);
router.post('/getOneAdmin', getOneAdmin);
router.post('/updateOneAdmin', updateOneAdmin);
router.post('/addOneAdmin', addOneAdmin);
router.post('/AdminLogin', AdminLogin);
router.post('/deleteOneAdmin', deleteOneAdmin);

//例子 登录 router.post('/login', login);

module.exports = router;
